package gametest1;

//鸡翁1值钱5，鸡母1值钱3，鸡雏3值钱1
//百钱买百鸡
public class 百钱百鸡 {
    public static void main(String[] args) {
//        a+b+c==100;
//        5a+3b+z/3==100;
//        0<=a<=20;
//        0<=b<=33;
//        0<=c<=100;
          for (int a=0;a<=20;a++){
              for(int b=0;b<=33;b++){
                  int c=100-a-b;
                  if(c%3==0 && 5*a+3*b+c/3==100){
                      System.out.println(a+","+b+","+c);
                  }
              }

          }
    }
}
